<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<%-- 页面标题栏 --%>
<div class="title">
	<s:a href="/admin/cityList.html" cssClass="parent fl"><s:text name="admin.cityList.title" /></s:a>
	<s:label cssClass="parent fl"  value=">" />
	<s:a action="/admin/districtList.html" cssClass="parent fl">
		<s:text name="admin.districtList.title" />
		<s:param name="cityId" value="cityId"></s:param>
	</s:a>
	<s:label cssClass="parent fl"  value=">" />
	<s:label cssClass="current fl" key="admin.streetList.title" />
	<s:a action="/admin/districtList.html" cssClass="back fr">
		[<s:text name="common.button.back" />]
		<s:param name="cityId" value="cityId"></s:param>
	</s:a>
	<div class="clear"></div>
	<hr class="title" />
</div>
<div class="clear titleMessage">
	<s:actionmessage cssClass="fl" />
	<s:form action="/admin/streetList.html" cssClass="fr" method="post" theme="simple">
		<s:hidden name="districtId" />
		<s:label key="admin.streetList.localStreetName" cssClass="tar vac plr" cssStyle="color: black;" />
		<s:textfield name="localStreetName" cssClass="sti vac" />
		<s:label key="common.label.status" cssClass="tar vac plr" cssStyle="color: black;" />
		<s:select name="statusId" list="statusList" listKey="id" listValue="name" cssClass="sts vac w200" theme="simple" />
		<s:submit  key="common.button.search" cssClass="smallbtn1 tac vac plr" />
	</s:form>
</div>

<%-- 表格 --%>
<div class="clear table">
	<%-- 表格标题栏 --%>
	<div class="row">
		<div class="cell-table-header" style="width: 60px;">
			<s:text name="admin.streetList.streetId" />
		</div>
		<div class="cell-table-header" style="width: 80px;">
			<s:text name="admin.streetList.streetName" />
		</div>
		<div class="cell-table-header" style="width: 100px;">
			<s:text name="admin.streetList.localStreetName" />
		</div>
		<div class="cell-table-header" style="width: 100px;">
			<s:text name="admin.streetList.localDistrictName" />
		</div>
		<div class="cell-table-header" style="width: 100px;">
			<s:text name="admin.streetList.localCityName" />
		</div>
		<div class="cell-table-header" style="width: 80px;">
			<s:text name="admin.streetList.postcode" />
		</div>
		<div class="cell-table-header" style="width: 60px;">
			<s:text name="admin.streetList.status" />
		</div>
		<div class="cell-table-header" style="width: 220px;">
			<s:text name="admin.streetList.description" />
		</div>
		<div class="cell-table-header" style="width: 120px;">
			<s:text name="common.label.operations" />
			<s:a action="streetAdd">
				[<s:text name="common.button.add" />]
				<s:param name="districtId" value="districtId"></s:param>
				<s:param name="cityId" value="cityId"></s:param>
			</s:a>
		</div>
	</div>
	<%-- 循环显示列表 --%>
	<s:iterator value="streetDetailList" var="streetDetailBean">
		<div class="row">
			<div class="cell-border tar">
				<s:property value="#streetDetailBean.streetId" />
			</div>
			<div class="cell-border">
				<s:property value="#streetDetailBean.streetName" />
			</div>
			<div class="cell-border">
				<s:property value="#streetDetailBean.localStreetName" />
			</div>
			<div class="cell-border">
				<s:property value="#streetDetailBean.localDistrictName" />
			</div>
			<div class="cell-border">
				<s:property value="#streetDetailBean.localCityName" />
			</div>
			<div class="cell-border">
				<s:property value="#streetDetailBean.postcode" />
			</div>
			<div class="cell-border tac">
				<s:if test="#streetDetailBean.statusId == 1">
					<s:text name="common.status.value1" />
				</s:if>
				<s:else>
					<s:text name="common.status.value0" />
				</s:else>
			</div>
			<div class="cell-border">
				<s:property value="#streetDetailBean.description" />
			</div>
			<div class="cell-border tac">
				<s:if test="#streetDetailBean.statusId == 1">
					<s:a action="streetEdit">
						[<s:text name="common.button.edit" />]
						<s:param name="streetId" value="#streetDetailBean.streetId"></s:param>
						<s:param name="districtId" value="#streetDetailBean.districtId"></s:param>
						<s:param name="cityId" value="#streetDetailBean.cityId"></s:param>
					</s:a>
					<s:a action="streetDelete">
						[<s:text name="common.button.delete" />]
						<s:param name="streetId" value="#streetDetailBean.streetId"></s:param>
						<s:param name="districtId" value="#streetDetailBean.districtId"></s:param>
						<s:param name="cityId" value="#streetDetailBean.cityId"></s:param>
					</s:a>
				</s:if>
				<s:else>
					<s:a action="streetRevive">
						[<s:text name="common.button.revive" />]
						<s:param name="streetId" value="#streetDetailBean.streetId"></s:param>
						<s:param name="districtId" value="#streetDetailBean.districtId"></s:param>
						<s:param name="cityId" value="#streetDetailBean.cityId"></s:param>
					</s:a>
				</s:else>
			</div>
		</div>
	</s:iterator>
</div>